<?php

/**
 * GestdentReserva form base class.
 *
 * @package    gestdent
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseGestdentReservaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'             => new sfWidgetFormInputHidden(),
      'fecha'          => new sfWidgetFormDate(),
      'hora'           => new sfWidgetFormPropelChoice(array('model' => 'GestdentHora', 'add_empty' => false)),
      'paciente'       => new sfWidgetFormPropelChoice(array('model' => 'GestdentPaciente', 'add_empty' => false)),
      'personal'       => new sfWidgetFormPropelChoice(array('model' => 'GestdentPersonal', 'add_empty' => false)),
      'tipoasistencia' => new sfWidgetFormPropelChoice(array('model' => 'GestdentTipoasistencia', 'add_empty' => false)),
      'confirmado'     => new sfWidgetFormInputCheckbox(),
      'recepcionado'   => new sfWidgetFormInputCheckbox(),
      'observacion'    => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'id'             => new sfValidatorPropelChoice(array('model' => 'GestdentReserva', 'column' => 'id', 'required' => false)),
      'fecha'          => new sfValidatorDate(),
      'hora'           => new sfValidatorPropelChoice(array('model' => 'GestdentHora', 'column' => 'id')),
      'paciente'       => new sfValidatorPropelChoice(array('model' => 'GestdentPaciente', 'column' => 'id')),
      'personal'       => new sfValidatorPropelChoice(array('model' => 'GestdentPersonal', 'column' => 'id')),
      'tipoasistencia' => new sfValidatorPropelChoice(array('model' => 'GestdentTipoasistencia', 'column' => 'id')),
      'confirmado'     => new sfValidatorBoolean(),
      'recepcionado'   => new sfValidatorBoolean(),
      'observacion'    => new sfValidatorString(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('gestdent_reserva[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'GestdentReserva';
  }


}
